package com.dks.mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import com.dks.dto.student.QsClassCapacityDto;
import com.dks.dto.student.TaskDto;
import com.dks.models.QsClass;
import com.dks.vo.qsClass.QsClassVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface QsClassMapper{

    Integer insert(QsClass qsClass);

    Integer update(QsClass qsClass);

    Integer delete(@Param("id") Integer id);

    QsClass select(@Param("id") Long id);

    Integer cntByMap(Map<String, Object> map);

    List<Integer> getByMap(Map<String, Object> map);

    List<QsClass> getByMapList(Map<String, Object> map);

    Integer updateByCode(QsClass qsClass);

    QsClass selectByBfCode(@Param("bfCode") String bfCode);

    List<QsClass> listScreening(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime,
                                @Param("studentId")Integer studentId, @Param("courseCategory")String courseCategory);

    List<QsClass> getBySeriesId(@Param("qsClassSeriesId")Long qsClassSeriesId, @Param("StartTime")LocalDateTime startTime);

    List<QsClassCapacityDto> getCountBySeriesId(@Param("qsClassSeriesId")Long qsClassSeriesId, @Param("StartTime")LocalDateTime startTime);

    QsClassCapacityDto getCountByClassId(@Param("id")Long id, @Param("StartTime")LocalDateTime startTime);

    QsClassVo getDetail(Long id);

    TaskDto getTaskRequirementByClassId(@Param("classId") Long classId);
}
